﻿<%@ Control Language="C#" %>
<telerik:RadCodeBlock runat="server" ID="RadCodeBlockCmd">
    <script>
        Sys.Application.add_load(function () {
            var b0 = $find('<%=b03.ClientID %>'), b1 = $find('<%=b04.ClientID %>');
            var grid = $find("<%# DataBinder.Eval(Container, "OwnerGridID") %>");
            function setEnable(v) {
                b0.set_enabled(v);
                b1.set_enabled(v);
            }
            setEnable(false);
            grid.add_rowSelected(function() {
                setEnable(true);
            });
            grid.add_rowDeselected(function() {
                var selected = grid.get_selectedItems().length > 0;
                setEnable(selected);
            });
        });
    </script>
</telerik:RadCodeBlock>
<telerik:RadButton ID="b03" runat="server" Text="公开" Icon-PrimaryIconCssClass="icon-verify"
    CommandName="Public" CommandArgument="1" UseSubmitBehavior="false" ToolTip="公开" />
<telerik:RadButton ID="b04" runat="server" Text="不公开" Icon-PrimaryIconCssClass="icon-unverify"
    CommandName="Public" CommandArgument="0" UseSubmitBehavior="false" ToolTip="不公开" />